1. Field of the Invention
The present invention relates to an image processing apparatus.
2. Description of the Related Art
Conventionally, there has been known an image processing system which can output images in various output forms, such as recording the images on a recording material such as photographic printing paper, displaying the images on a displaying means such as a display unit, or storing the image data in an information recording medium such as a CD-ROM, after various image processings are performed on the image data obtained by reading film images recorded on a photographic film with a CCD or the like, or on the image data inputted from a digital camera or the like.
In accordance with this image processing system, the quality of output images can be freely controlled by the system""s image processing of image data, as compared with a conventional photographic processing system in which film images are recorded on a photographic printing paper by plane exposing (analog exposing). Thus, high-quality output images can be achieved.
When image data subjected to various correcting processings is recorded on a recording material as an image in this type of image processing system, herein assuming, for example, that the horizontal dimension of a set recording area 110 is x and the vertical dimension thereof is y, and that the horizontal dimension of an image area 112 is a and the vertical dimension thereof is b, as shown in FIG. 4A, then in the case where y less than b, i.e., the vertical dimension b of the image area 112 is larger than the vertical dimension y of the recording area 110, as shown in FIG. 4B, the whole image area 112 is not contained in the recording area 110. Therefore, only the portion of the image area 112 which can be contained in the recording area 110 is recorded, and the whole image represented by the image data cannot be recorded. The same result occurs when x less than a, i.e., the horizontal dimension a of the image area 112 is larger than the horizontal dimension x of the recording area 110.
In order to prevent this, an operator verifies whether the longitudinal direction of the image area and the longitudinal direction of the set recording area are correspondent with each other by outputting image on a monitor or the like, and then if the longitudinal directions thereof are not correspondent with each other, the operator performs processing, for example, to adjust the image so that the orientation thereof is changed by issuing an instruction to rotate the image area, or as shown in FIG. 4C, to adjust the image so that the image is reduced (compressed) so that the vertical dimension of the image area is correspondent with the vertical dimension of the recording area, or reduced so that the horizontal dimension of the image area is correspondent with the horizontal dimension of the recording area.
However, there is a disadvantage that the operation for each of a large amount of image data to be processed, in which the operator verifies whether the longitudinal direction of the image area and the longitudinal direction of the set recording area are correspondent with each other, and then instructs whether or not the orientation of the image area is to be changed, is very troublesome and inefficient.
Further, when processing, such as reducing the vertical dimension of the image area in correspondence with the vertical dimension of the recording area, or reducing the horizontal dimension of the image area in correspondence with the horizontal dimension of the recording area, is performed, as shown in FIG. 4C, there is a disadvantage that the area occupied by margins in the recording area is large, and the area occupied by the image area in the recording area is considerably small, and as a result, the image is smaller than necessary.
As described above, it is an object of the present invention to provide an image processing apparatus, in which image data can be outputted so that the longitudinal direction of the image area, which is represented by the image data, is correspondent with the longitudinal direction of the preset recording area.
In order to attain the above object, an image processing apparatus according to a first aspect of the present invention comprises determining means, which compares dimensions of an image represented by inputted image data, the dimensions being obtained on the basis of the number of pixels in the vertical direction and the number of pixels in the horizontal direction of the image data, with dimensions of a preset recording area for recording the image, and determines whether a longitudinal direction of an area of the image represented by the image data and a longitudinal direction of the recording area are correspondent with each other; and image rotating means, which rotates the image so that the longitudinal directions are correspondent with each other, when it is determined by the determining means that the longitudinal direction of the area of the image and the longitudinal direction of the recording area are not correspondent with each other.
In accordance with the first aspect of the present invention, the determining means determines whether the longitudinal direction of the area occupied by the image represented by the image data (i.e., the image area) is correspondent with the longitudinal direction of the recording area, based on the dimensions of the image represented by the image data (The dimensions are obtained on the basis of the number of pixels in the vertical direction and the number of pixels in the horizontal direction of the image data.) and the dimensions of the recording area. It is the same in determining whether a direction which is vertical to the longitudinal direction of the image area and a direction which is vertical to the longitudinal direction of the recording area are correspondent with each other. Accordingly, the present invention includes determining whether the directions each of which is vertical to each of the longitudinal direction are correspondent with each other.
When it is determined by the determining means that the longitudinal direction of the image area is not correspondent with the longitudinal direction of the recording area, the image rotating means performs conversion in which the image area is rotated so that the longitudinal direction thereof is correspondent with the longitudinal direction of the recording area. As for the amount of the rotation of an image, in the present invention, it is sufficient if, by rotating the image area, the longitudinal direction of the image area is made substantially parallel to the longitudinal direction of the recording area. For example, if the image area is rotated so that the longitudinal direction thereof and the longitudinal direction of the recording area are correspondent with each other when the longitudinal direction of the image area and the direction which is vertical to the longitudinal direction of the recording area are correspondent with each other, as shown in FIG. 4, if the image area is contained in the recording area, the longitudinal direction of the image area and the longitudinal direction of the recording area need not be completely parallel to each other.
Preferably, the resultant image is rotated by 90 degrees, by outputting the image data, which has been read in the vertical direction, in the horizontal direction, or on the contrary, by outputting the image data, which has been read in the horizontal direction, in the vertical direction. This ensures that the image data can be outputted so that the longitudinal direction of the image area and the longitudinal direction of the recording area are correspondent with each other.
An image processing apparatus according to a second aspect of the present invention comprises determining means, which compares dimensions of an image area of an image represented by inputted image data with dimensions of a preset recording area for recording the image, and determines whether the dimension of a longitudinal-direction of the image area and the dimension of a longitudinal direction of the recording area are correspondent with each other; and outputting means, which outputs the image so that the dimension of the longitudinal direction of the image area and the dimension of the longitudinal direction of the recording area are correspondent with each other, when it is determined by the determining means that the dimension of the longitudinal direction of the image area and the dimension of the longitudinal direction of the recording area are not correspondent with each other.